package com.xiyou.luckdraw.api.converter;

import com.xiyou.luckdraw.api.dal.entitys.AnswerBank;
import com.xiyou.luckdraw.api.dto.answer.AddAnswerBankRequest;
import com.xiyou.luckdraw.api.dto.answer.AnswerBankDto;
import com.xiyou.luckdraw.api.dto.answer.UpdateAnswerRequest;
import org.mapstruct.Mapper;
import org.mapstruct.Mappings;

import java.util.List;

/**
 * @ClassName: AnswerBankConverter
 * @Description: 答题库转换
 * @author: limingxing
 * @Date: 2019-10-09 11:00
 */
@Mapper(componentModel = "spring")
public interface AnswerBankConverter {

    @Mappings({})
    AnswerBank req2Answer(AddAnswerBankRequest request);

    List<AnswerBankDto> answerBanks2Dto(List<AnswerBank> answerBanks);

    @Mappings({})
    AnswerBank req2Answer(UpdateAnswerRequest request);

    List<AnswerBank> req2ListAnswer(List<AnswerBankDto> answerBankDtos);
}
